package com.fqgj.sentry.controller.pc.request;

import com.fqgj.sentry.common.exception.BizException;
import com.fqgj.sentry.common.exception.enums.ErrorCodeEnums;
import com.fqgj.sentry.common.request.ParamsObject;

/**
 * Created by ykpbean kangping.ying@yuntu-inc.com
 *
 * @description
 * @create 2017-07-27 下午8:34
 */


public class AddPolicyExecutorVo extends ParamsObject {

    /**
     * 策略集ID
     */
    private Long policySetsId;
    /**
     * 类型：1 验证者，2 挑战者，3冠军者
     */
    private Integer type;
    /**
     * 拷贝的执行者id
     */
    private Long copyExecutorId;
    /**
     * 拷贝版本类型
     */
    private Integer copyType;
    /**
     * 来源的版本
     */
    private Integer copyVersion;
    /**
     * 执行比例
     */
    private Integer executePercent;
    /**
     * 说明
     */
    private String info;

    @Override
    public void validate() {
        if (policySetsId == null || null == type) {
            throw new BizException(ErrorCodeEnums.param_valid_error);
        }
    }

    public Long getPolicySetsId() {
        return policySetsId;
    }

    public AddPolicyExecutorVo setPolicySetsId(Long policySetsId) {
        this.policySetsId = policySetsId;
        return this;
    }

    public Integer getType() {
        return type;
    }

    public AddPolicyExecutorVo setType(Integer type) {
        this.type = type;
        return this;
    }

    public Long getCopyExecutorId() {
        return copyExecutorId;
    }

    public AddPolicyExecutorVo setCopyExecutorId(Long copyExecutorId) {
        this.copyExecutorId = copyExecutorId;
        return this;
    }

    public Integer getCopyType() {
        return copyType;
    }

    public AddPolicyExecutorVo setCopyType(Integer copyType) {
        this.copyType = copyType;
        return this;
    }

    public Integer getCopyVersion() {
        return copyVersion;
    }

    public AddPolicyExecutorVo setCopyVersion(Integer copyVersion) {
        this.copyVersion = copyVersion;
        return this;
    }

    public Integer getExecutePercent() {
        return executePercent;
    }

    public AddPolicyExecutorVo setExecutePercent(Integer executePercent) {
        this.executePercent = executePercent;
        return this;
    }

    public String getInfo() {
        return info;
    }

    public AddPolicyExecutorVo setInfo(String info) {
        this.info = info;
        return this;
    }
}
